import instance from '../../utils/request'

// const base = 'http://192.168.1.9:9002/cookcar-plat/'
const base = 'cookcar-plat/'


// 获取品牌
export function getAllList(data) {
  const config = {
    method: 'get',
    url: `${base}vehicle/brandManagement/getAllList`,
    params: data
  }
  return instance(config)
}

// 获取车型
export function getCarTypeList(id) {
  const config = {
    method: 'get',
    url: `${base}vehicle/typeData/getAllList?vnId=${id}`
  }
  return instance(config)
}

// 通过车系查车型 /vehicle/typeData / getAllList
export function getVtdname(biId) {
  const config = {
    method: 'get',
    url: `/cookcar-car/do1/vehicleTypeData/${biId}-query`,
  }
  return instance(config)
}

// 获取车系
export function getbiNameList(vnId) {
  const config = {
    method: 'get',
    url: `/cookcar-car/do1/brandInformation/${vnId}-query2`,
  }
  return instance(config)
}

// 查询车型
export function getvtdNameList(data) {
  const config = {
    method: 'get',
    url: `${base}vehicle/typeData/`,
    params: data
  }
  return instance(config)
}

// 发送寻车表单
export function getFindForm(data) {
  const config = {
    method: 'post',
    url: `${base}query/carManagementC/C/save`,
    data
  }
  return instance(config)
}

// 发送按揭表单
export function mortgageSave(data) {
  const config = {
    method: 'post',
    url: `${base}apply/mortgageApplyC/saveC`,
    data
  }
  return instance(config)
}
